package com.zl.learning.object.test;

public enum Day {
    /**
     * 周日
     */
    SUNDAY,
    /**
     * 周一
     */
    MONDAY,
    /**
     * 周二
     */
    TUESDAY,
    /**
     * 周三
     */
    WEDNESDAY,
    /**
     * 周四
     */
    THURSDAY,
    /**
     * 周五
     */
    FRIDAY,
    /**
     * 周六
     */
    SATURDAY;

    public void say() {
        System.out.println("I'm " + this.name() + "-------" + this.ordinal());
    }

    public static Day parseDay(int day) {
        Day tmpDay = SUNDAY;
        switch (day) {
            case 1:
                tmpDay = MONDAY;
                break;
            case 2:
                tmpDay = TUESDAY;
                break;
            default:
                break;
        }
        return tmpDay;
    }
}
